// 文章请求模块

// 用户相关请求模块
import request from '../utils/quest'

// 导出获取频道新闻推荐_V1.1
export const getNewsList = (data) => {
  return request.get('/v1_1/articles', {
    params: data
  })
}

// 导出获取新闻详情的api
export const getNewDetail = (data) => {
  return request.get('/v1_0/articles/' + data)
}

// 导出收藏文章api
export const isCollections = (data) => {
  return request.post('/v1_0/article/collections', {
    target: data
  })
}

// 导出取消收藏文章api
export const noCollections = (data) => {
  return request.delete('/v1_0/article/collections/' + data)
}

// 导出喜欢文章api
export const isLiking = (data) => {
  return request.post('/v1_0/article/likings', {
    target: data
  })
}

// 导出取消喜欢文章api
export const noLiking = (data) => {
  return request.delete('/v1_0/article/likings/' + data)
}

// 导出不喜欢文章api
export const isDisLiking = (data) => {
  return request.post('/v1_0/article/dislikes', {
    target: data
  })
}

// 导出取消不喜欢文章api
export const noDisLiking = (data) => {
  return request.delete('/v1_0/article/dislikes/' + data)
}
